// member-property
const { BaseBehavior, COMPONENT_OPTIONS } = require('../../mixins/component');
const { navTo } = require('../../common/platform');
const { PAGE_NAV } = require('../../constants/route');

Component({
    behaviors: [BaseBehavior],
    options: {
        ...COMPONENT_OPTIONS,
    },
    properties: {
        balance: {
            type: String,
            value: '- -',
        },
        coupon: {
            type: String,
            value: '0',
        },
        integral: {
            type: String,
            value: '- -',
        },
    },
    data: {

    },
    methods: {
        balanceAction() {
            navTo(PAGE_NAV.cardDetail, {
                tab: 'balance',
            });
        },
        couponAction() {
            navTo(PAGE_NAV.couponList);
        },
        integralAction() {
            navTo(PAGE_NAV.cardDetail, {
                tab: 'integral',
            });
        },
    }
})

